package com.SinaMicrobloggingAPI.Core.Request;

import org.apache.http.message.BasicNameValuePair;

import com.SinaMicrobloggingAPI.Core.OauthConstants;
import com.SinaMicrobloggingAPI.Core.Response.IResponse;

public class AccessTokenRequest extends RequestBase {
	public static final String ACCESS_TOKEN = "AccessToken";
	private String oauthVerifier = "";

	@Override
	protected String getRequestName() {
		return ACCESS_TOKEN;
	}

	public AccessTokenRequest(IResponse response) {
		super(response);
	}

	public String getOauthVerifier() {
		return oauthVerifier;
	}

	public void setOauthVerifier(String oauthVerifier) {
		this.oauthVerifier = oauthVerifier;
	}

	protected String getRequestParamenters() {

		BasicNameValuePair oauthVerifier = new BasicNameValuePair(
				OauthConstants.OAUTH_VERIFIER_KEY, getOauthVerifier());
		BasicNameValuePair oauth_token = new BasicNameValuePair(
				OauthConstants.OAUTH_TOKEN_KEY, getOauthToken());
		BasicNameValuePair oauth_token_secret = new BasicNameValuePair(
				OauthConstants.OAUTH_TOKEN_SECRET_KEY, getOauthTokenSecret());

		oauthParamenterModels.add(oauth_token);
		oauthParamenterModels.add(oauth_token_secret);
		oauthParamenterModels.add(oauthVerifier);
		return super.getRequestParamenters();
	}

}
